<!DOCTYPE html>
<html ng-app="plunker">

<head>

	<jsp:include page="/page/header.jsp"></jsp:include>
   
</head>

<body ng-controller="adminBolao">


    <div ng-include="'/megaacerto/page/menu-include.jsp'"></div>


    <!-- modal login -->

    <div class="modal" id="login" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">

            <div class="modal-content">

                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal">
                        <span aria-hidden="true">&times;</span><span class="sr-only">Fechar</span>
                    </button>
                    <h4 class="modal-title" id="myModalLabel">Login</h4>
                </div>

                <div class="modal-body">

                    <form class="form-horizontal" action="login" method="post" name="myForm">

                        <div class="form-group">
                            <label for="inputEmail" class="control-label col-xs-2">Email</label>
                            <div class="col-xs-10">
                                <input type="email" class="form-control" id="inputEmail" placeholder="Email" name="user" ng-required="true">
                            </div>
                        </div>

                        <div class="form-group">
                            <label for="inputPassword" class="control-label col-xs-2">Senha</label>
                            <div class="col-xs-10">
                                <input type="password" class="form-control" id="inputPassword" placeholder="Senha" name="senha" ng-minlength="6" ng-required="true">
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-xs-offset-2 col-xs-10">
                                <button type="submit" class="btn btn-primary" ng-click="limparCarrinho();" ng-disabled="myForm.$invalid">Login</button>
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-xs-offset-2 col-xs-10">
                                <label><a href="page/usuario.html">CADASTRE-SE</a>||<a href="page/recuperarSenha.html">Esqueci minha senha</a>
                                </label>
                            </div>
                        </div>
                    </form>

                </div>

            </div>
        </div>
    </div>

    <!-- modal login (fim) -->


    <div id="wrap">
        <div id="main" class="container clear-top intForm">
            <div class="panel panel-primary">
                <div class="panel-heading">
                    <h3 class="panel-title">Cadastro de Jogos(Desdobramento)</h3>
                </div>
                <div class="panel-body">
                    <form class="form-horizontal" name="myForm">
                        <div class="form-group">
                            <table class="table table-striped table-hover ">
                                <thead>
                                    <tr>
                                        <th>
                                            <a href="#" ng-click="carregarBolaoSemDesdobramento('0')">
                                                <img alt="" ng-disable="true" ng-src="../img/btnmegasena.jpg">
                                            </a>
                                        </th>
                                        <th>
                                            <a href="#" ng-click="carregarBolaoSemDesdobramento('1')">
                                                <img alt="" ng-src="../img/btnquina.jpg">
                                            </a>
                                        </th>
                                        <th>
                                            <a href="#" ng-click="carregarBolaoSemDesdobramento('2')">
                                                <img alt="" ng-src="../img/bntlotomania.jpg">
                                            </a>
                                        </th>
                                        <th>
                                            <a href="#" ng-click="carregarBolaoSemDesdobramento('3')">
                                                <img alt="" ng-src="../img/btnduplasena.jpg">
                                            </a>
                                        </th>
                                        <th>
                                            <a href="#" ng-click="carregarBolaoSemDesdobramento('4')">
                                                <img alt="" ng-src="../img/bntlotofacil.jpg">
                                            </a>
                                        </th>
                                    </tr>
                                </thead>
                            </table>
                        </div>
                        <legend>
                            <b>{{legenda}}</b>
                        </legend>
                        <div class="form-group">
                            <label class="control-label col-xs-2">Indentificador Bolão
                            </label>
                            <div class="col-xs-9">
                                <select class="form-control" ng-required="true" ng-model="bolaoSelecionado">
                                    <option ng-repeat="bolao in boloes" value="{{bolao.id}}">{{bolao.identificadorGrupo}}</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="inputQtdNumerosMarcado" class="control-label col-xs-2">Quantidade de numeros marcado
                            </label>
                            <div class="col-xs-9">
                                <input id="inputQtdNumerosMarcado" type="number" ng-model="qtdNumerosMarcado" class="form-control" ng-required="true" max="100">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="inputSeqObrigatoria" class="control-label col-xs-2">Sequencia Obrigatoria
                            </label>
                            <div class="col-xs-9">
                                <input id="inputSeqObrigatoria" ng-model="seqObrigatoria" class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-xs-2">Sequência Fixa
                            </label>
                            <div class="col-xs-9">
                                <input id="inputSeqIgnorada" ng-model="seqFixa" class="form-control">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="inputQtdJogos" class="control-label col-xs-2">Quantidade de Jogos</label>
                            <div class="col-xs-9">
                                <input id="inputQtdJogos" ng-model="qtdJogos" class="form-control" ng-required="true">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-xs-offset-2 col-xs-10">
                                <button class="btn btn-primary" ng-disabled="myForm.$invalid" ng-click="addDesdobramento();">Adicionar Desdobramento
                                </button>
                            </div>
                        </div>
                    </form>
                    <table class="table table-striped table-hover ">
                        <thead>
                            <tr>
                                <th>QTD. Numeros Marcados</th>
                                <th>Desc. Sequencia OB</th>
                                <th>Seq Obrigatoria</th>
                                <th>QTD. Jogos</th>
                            </tr>
                        </thead>
                        <tbody ng-repeat="desdobramento in desdobramentos">
                            <tr>
                                <th>{{desdobramento.qtdNumerosMarcado}}</th>
                                <td>{{desdobramento.descricaoSeqObrigatoria}}</td>
                                <td>{{desdobramento.seqObrigatoria}}</td>
                                <td>{{desdobramento.qtdJogos}}</td>
                            </tr>
                        </tbody>
                    </table>
                    <div class="form-group">
                        <div class="col-xs-offset-2 col-xs-10">
                            <button class="btn btn-primary" ng-disabled="liberaEnvioDesdobramento" ng-click="enviarDesdobramento()">Enviar</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>


    <!-- inicio footer -->


    <footer class="footer ng-scope clearfix">

        <div class="footer-top">
            <h3>Formas de pagamento</h3>
            <img src="img/pagamento.png">
        </div>


        <div class="footer-bottom">
            <div class="in-footer clearfix">
                <span class="pull-left">© 2014 | Mega Acerto</span>
                <ul class="pull-right social list-inline">
                    <li>
                        <a href="#">
                            <img src="img/face.png">
                        </a>
                    </li>
                    <li>
                        <a href="#">
                            <img src="img/twitter.png">
                        </a>
                    </li>
                </ul>
            </div>
        </div>


    </footer>

	<jsp:include page="/page/scripts.jsp"/>

</body>

</html>